﻿<phone:PhoneApplicationPage
   xmlns:AMap="clr-namespace:Com.AMap.Maps.Api;assembly=AMap.WP7.Map.API" 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:local="clr-namespace:wpapp" 
    x:Class="wpapp.MainPage" 
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800" 
    d:DataContext="{d:DesignData SampleData/MainViewModelSampleData.xaml}"
    SupportedOrientations="Portrait"  Orientation="Portrait"
    shell:SystemTray.IsVisible="False">

	<phone:PhoneApplicationPage.Resources>
		<local:product x:Key="productDataSource" d:IsDataSource="True"/>
		<local:zixun x:Key="zixunDataSource" d:IsDataSource="True"/>
	</phone:PhoneApplicationPage.Resources>
	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>
<!--LayoutRoot 是包含所有页面内容的根网格-->
	<Grid x:Name="LayoutRoot" Background="Transparent">
 
		<!--Panorama 控件-->
		<controls:Panorama x:Name="thepna" Title="华康家私" SelectionChanged="thepna_SelectionChanged">
			<controls:Panorama.Background>
				<ImageBrush ImageSource="PanoramaBackground.png"/>
			</controls:Panorama.Background>
 
			<!--Panorama 项目一-->
			<controls:PanoramaItem Header="首页">
				<Grid Height="500" >
                 	  <ScrollViewer HorizontalAlignment="Left" HorizontalScrollBarVisibility="Visible" Margin="0,0,0,-74">
                 	  	<StackPanel ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto">
                 	  		<Image Source="201309040957262.jpg" Stretch="Fill" Height="500" Margin="5,0" Width="420"/>
                 	  		<TextBlock x:Name="txbhk" TextWrapping="Wrap" Text="TextBlock" ScrollViewer.HorizontalScrollBarVisibility="Auto" Width="415"/>
                 	  	</StackPanel>
                 	  </ScrollViewer>
                </Grid>
			</controls:PanoramaItem>
 
			<!--Panorama 项目一-->
			<controls:PanoramaItem Header="最新资讯" DataContext="{Binding Source={StaticResource zixunDataSource}}">
                <!--具有文字环绕的双线列表-->
				<ListBox x:Name="thelist" Margin="0,0,-12,0" ItemsSource="{Binding}">
					<ListBox.ItemTemplate>
						<DataTemplate>
							<StackPanel Margin="0,0,0,17" Width="432" Height="78" HorizontalAlignment="Left">
								<HyperlinkButton Content="{Binding header}" HorizontalAlignment="Left" Tag="{Binding neirong}" Click="HyperlinkButton_Click"/>
								<TextBlock Text="{Binding time}" TextWrapping="Wrap" Margin="12,-6,12,0" Style="{StaticResource PhoneTextSubtleStyle}" HorizontalAlignment="Left"/>
							</StackPanel>
						</DataTemplate>
					</ListBox.ItemTemplate>
				</ListBox>
			</controls:PanoramaItem>
 
			<!--使用“Orientation="Horizontal"”可使面板水平放置-->
			<controls:PanoramaItem Header="商品展示" DataContext="{Binding Source={StaticResource productDataSource}}">
				<!--具有图像占位符和文字环绕的双线列表-->
				<ListBox x:Name="productlistbox" ItemsSource="{Binding Mode=OneWay}" Margin="9,0,0,0">
					<ListBox.ItemTemplate>
						<DataTemplate>
							<StackPanel Orientation="Horizontal" Margin="0,0,0,17" Width="535">
								<!--用图像替换矩形-->
								<Image Height="132" Width="260" Stretch="UniformToFill" Source="{Binding imgurl}" MouseLeftButtonDown="Image_MouseLeftButtonDown" Tag="{Binding imgurl}" />
								<StackPanel HorizontalAlignment="Right" Width="221">                                    
									<TextBlock Text="{Binding productname}" TextWrapping="Wrap" Style="{StaticResource PhoneTextExtraLargeStyle}" Margin="0" HorizontalAlignment="Left" Width="210" Height="78" />
									<TextBlock Text="{Binding time}" TextWrapping="Wrap" Margin="0,-6,0,0" Style="{StaticResource PhoneTextSubtleStyle}" HorizontalAlignment="Left" Height="58" Width="210" RenderTransformOrigin="0.49,-0.15"/>
								</StackPanel>
							</StackPanel>
						</DataTemplate>
					</ListBox.ItemTemplate>
				</ListBox>
			</controls:PanoramaItem>
			<controls:PanoramaItem Header="商场地图">
				<Grid Margin="0,-19,0,0">
					<controls:Pivot HorizontalAlignment="Left" Height="507" Title="联丰店" VerticalAlignment="Top" Width="420">
						<controls:PivotItem Header="1层" Margin="0,0,-341,-346">
							 <ScrollViewer  VerticalAlignment="Top"  HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" HorizontalAlignment="Left"  Margin="0,0,0,-74" Width="440" Height="423">
                        <Image Source="1f.jpg" Stretch="Fill"/>
                    </ScrollViewer>
						</controls:PivotItem>
						<controls:PivotItem Header="1.5层" Margin="0,0,-341,-346">
							 <ScrollViewer  VerticalAlignment="Top"  HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" HorizontalAlignment="Left"  Margin="0,0,0,-74" Width="440" Height="423">
                        <Image Source="1.5f.jpg" Stretch="Fill"/>
						</ScrollViewer>
						</controls:PivotItem>
						<controls:PivotItem Header="2层" Margin="0,0,-341,-346">
							 <ScrollViewer  VerticalAlignment="Top"  HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" HorizontalAlignment="Left"  Margin="0,0,0,-74" Width="440" Height="423">
                        <Image Source="2f.jpg" Stretch="Fill"/>
						</ScrollViewer>
						</controls:PivotItem>
						<controls:PivotItem Header="3层" Margin="0,0,-341,-346">
							 <ScrollViewer  VerticalAlignment="Top"  HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" HorizontalAlignment="Left"  Margin="0,0,0,-74" Width="440" Height="423">
                        <Image Source="3f.jpg" Stretch="Fill"/>
						</ScrollViewer>
						</controls:PivotItem>
						<controls:PivotItem Header="4层" Margin="0,0,-341,-346">
							 <ScrollViewer  VerticalAlignment="Top"  HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" HorizontalAlignment="Left"  Margin="0,0,0,-74" Width="440" Height="423">
                        <Image Source="4f.jpg" Stretch="Fill"/>
						</ScrollViewer>
						</controls:PivotItem>
						<controls:PivotItem Header="5层" Margin="0,0,-341,-346">
							 <ScrollViewer  VerticalAlignment="Top"  HorizontalScrollBarVisibility="Visible" VerticalScrollBarVisibility="Visible" HorizontalAlignment="Left"  Margin="0,0,0,-74" Width="440" Height="423">
                        <Image Source="5f.jpg" Stretch="Fill"/>
						</ScrollViewer>
						</controls:PivotItem>
					</controls:Pivot>
				</Grid>
			</controls:PanoramaItem>
			<controls:PanoramaItem Header="导航地图">
                <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,-10,12,0">
                    <AMap:MMap x:Name="MyMap" Center="121.50828021, 29.86859951" ToolBar="Visible" MapLoaded="map_loaded" Zoom="15"/>

                </Grid>
            </controls:PanoramaItem>
        </controls:Panorama>
    </Grid>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="feature.search.png" Text="定位华康" Click="brow" />
            <shell:ApplicationBarIconButton IconUri="download.png" Text="定位自己" Click="wsch" />
            <shell:ApplicationBarIconButton IconUri="feature.video.png" Text="驾车导航" Click="jiache" />
            <shell:ApplicationBarIconButton IconUri="favs.addto.png" Text="周边查找" Click="poisch" />
                   </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
</phone:PhoneApplicationPage>